package cn.le.quartz;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 项目名  spring-boot
 * Created by lansp
 * Created at 2018/5/21
 * 描述: 任务类
 */
@Component
public class QuartzExectueJob implements Job{
	@Override
	public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		System.out.println("任务执行 : " + sdf.format(new Date()));
		//Object str = jobExecutionContext.getJobDetail().getJobDataMap().get("1");
		//System.out.println(str);
	}
}
